home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / amigadoslibrary / setprotection.c < prev    next >
C/C++ Source or Header  |  1996-10-10  |  708b  |  33 lines

  1. /* SetProtection.c   V1.0   93-03-15                        */
  2. /* ROM library: "dos.library/SetProtection", (All versions) */
  3. /* Copyright 1993, Anders Bjerin, Amiga C Club              */
  4.  
  5. #include <dos/dos.h>
  6.  
  7. #include <clib/dos_protos.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10.  
  11. UBYTE *version = "$VER: SetProtection 1.0";
  12.  
  13. int main( int argc, char *argv[] );
  14. int main( int argc, char *argv[] )
  15. {
  16.   BOOL ok;
  17.  
  18.  
  19.   /* Protect the file: (We set the FIBF_DELETE */
  20.   /* flag which will remove the "d" bit.)      */
  21.   ok = SetProtection( "RAM:HighScore.dat", FIBF_DELETE );
  22.  
  23.   /* OK? */
  24.   if( ok )
  25.     printf( "File protected!\n" );
  26.   else
  27.     printf( "Error! Could not protect the file!\n" );
  28.  
  29.   exit( 0 );
  30. }
  31.  
  32.  
  33.